package com.dcy.znoa.common.util.wj;

/**
 * 栋数和层数合起来的一个类
 * Created by $ pengyu on 2018/5/18.
 */
public class DongCengResult {
    int x1;
    int x2;
    int x3;
    int x4;

    int y1;
    int y2;
    int y3;
    int y4;

    int acreage;//计容面积
    int baseArea;//基地面积
    int biggestValue;//最大货值

    public int getTempAcreage(int A,int B,int C,int D){
        return x1*y1*A + x2*y2*B + x3*y3*C + x4*y4*D;
//        return   x3*y3*C + x4*y4*D;
    }

    public int getTempBaseArea(int A,int B,int C,int D){
        return y1*A + y2*B + y3*C + y4*D;
//        return  y3*C + y4*D;
    }


    public boolean checkAcreage(int A,int B,int C,int D,int acreage,int min){//min为差值
        int temp = x1*y1*A + x2*y2*B + x3*y3*C + x4*y4*D;
        if((temp <=acreage) && (temp >= (acreage - min)) ){
            return true;
        }
        return false;
    }

    public boolean checkBaseArea(int A, int B, int C, int D, int baseArea, int min){//min为差值
        int temp = y1*A + y2*B + y3*C + y4*D;
        if((temp <=baseArea) && (temp >= (baseArea - min)) ){
            return true;
        }
        return false;
    }

    public DongCengResult() {
    }

    public DongCengResult(int x1, int x2, int x3, int x4, int y1, int y2, int y3, int y4) {
        this.x1 = x1;
        this.x2 = x2;
        this.x3 = x3;
        this.x4 = x4;
        this.y1 = y1;
        this.y2 = y2;
        this.y3 = y3;
        this.y4 = y4;
    }

    public void init(int x1, int x2, int x3, int x4, int y1, int y2, int y3, int y4) {
        this.x1 = x1;
        this.x2 = x2;
        this.x3 = x3;
        this.x4 = x4;
        this.y1 = y1;
        this.y2 = y2;
        this.y3 = y3;
        this.y4 = y4;
    }
    public void destory() {
        this.x1 = 0;
        this.x2 = 0;
        this.x3 = 0;
        this.x4 = 0;
        this.y1 = 0;
        this.y2 = 0;
        this.y3 = 0;
        this.y4 = 0;
    }

    public DongCengResult(int x1, int x2, int x3, int x4, int y1, int y2, int y3, int y4, int acreage, int baseArea, int biggestValue) {
        this.x1 = x1;
        this.x2 = x2;
        this.x3 = x3;
        this.x4 = x4;
        this.y1 = y1;
        this.y2 = y2;
        this.y3 = y3;
        this.y4 = y4;
        this.acreage = acreage;
        this.baseArea = baseArea;
        this.biggestValue = biggestValue;
    }

    public int getX1() {
        return x1;
    }

    public void setX1(int x1) {
        this.x1 = x1;
    }

    public int getX2() {
        return x2;
    }

    public void setX2(int x2) {
        this.x2 = x2;
    }

    public int getX3() {
        return x3;
    }

    public void setX3(int x3) {
        this.x3 = x3;
    }

    public int getX4() {
        return x4;
    }

    public void setX4(int x4) {
        this.x4 = x4;
    }

    public int getY1() {
        return y1;
    }

    public void setY1(int y1) {
        this.y1 = y1;
    }

    public int getY2() {
        return y2;
    }

    public void setY2(int y2) {
        this.y2 = y2;
    }

    public int getY3() {
        return y3;
    }

    public void setY3(int y3) {
        this.y3 = y3;
    }

    public int getY4() {
        return y4;
    }

    public void setY4(int y4) {
        this.y4 = y4;
    }

    public int getAcreage() {
        return acreage;
    }

    public void setAcreage(int acreage) {
        this.acreage = acreage;
    }

    public int getBaseArea() {
        return baseArea;
    }

    public void setBaseArea(int baseArea) {
        this.baseArea = baseArea;
    }

    public int getBiggestValue() {
        return biggestValue;
    }

    public void setBiggestValue(int biggestValue) {
        this.biggestValue = biggestValue;
    }

    @Override
    public String toString() {
        return "DongCengResult{" +
                "x1=" + x1 +
                ", x2=" + x2 +
                ", x3=" + x3 +
                ", x4=" + x4 +
                ", y1=" + y1 +
                ", y2=" + y2 +
                ", y3=" + y3 +
                ", y4=" + y4 +
                ", acreage=" + acreage +
                ", baseArea=" + baseArea +
                ", biggestValue=" + biggestValue +
                '}';
    }


}
